		$(function(){
				
			
			//图片上传
		    $('#photo-file').fileinput({
		        language: 'zh',
		        uploadUrl: 'uploadPhoto.action',
				showCaption: false,
		        allowedFileExtensions : ['jpg', 'png','gif'],
				maxFilesNum: 10,
				browseClass: "btn btn-primary btn-lg",
				uploadAsync: true,
		        previewFileIcon: "<i class='glyphicon glyphicon-king'></i>"
		    }).on('fileuploaded',function(){alert('上传成功');});
		    
		    
		    //下载图片
		    $('#downloadBtn').click(function(){
		    	if(0 == $('#downloadFrame').size()){
		    		$('#downloadDiv').append('<iframe id="downloadFrame" style="display:none"/>');
		    	}
		    	$('#downloadFrame').attr('src','downloadPhoto.action');
		    });
		    		    
		    
		    //文件上传
		    $("#excel-file").fileinput({
		        language: 'zh',
		        uploadUrl: 'uploadExcel.action',
				showCaption: false,
		        allowedFileExtensions : ['xlsx', 'xls'],
				maxFilesNum: 10,
				//showPreview:false,
				browseClass: "btn btn-primary btn-lg",
				uploadAsync: true,
		        previewFileIcon: "<i class='glyphicon glyphicon-king'></i>"
		    }).on('fileuploaded',function(event, data, previewId, index){alert(data.response);});
		   
		    
		    //下载文件
		    $('#dloadBtn').click(function(){
		    	if(0 == $('#exportFrame').size()){
		    		$('#dloadDiv').append('<iframe id="dloadFrame" style="display:none"/>');
		    	}
		    	$('#dloadFrame').attr('src','exportExcel.action');
		    });
		    
		   
		    
		    //导入Excel
		  
		    $("#uploadBtn").fileinput({
		        language: 'zh',
		        uploadUrl: 'sysDemoController/uploadExcel.action',
				showCaption: false,
		        allowedFileExtensions : ['xlsx', 'xls'],
				maxFilesNum: 10,
				//showPreview:false,
				browseClass: "btn btn-primary btn-lg",
				uploadAsync: true,
		        previewFileIcon: "<i class='glyphicon glyphicon-king'></i>"
		    }).on('fileuploaded',function(event, data, previewId, index){alert(data.response);});
		    
		    
		    
		    //下载Excel
		    $('#exportBtn').click(function(){
		    	if(0 == $('#exportFrame').size()){
		    		$('#exportDiv').append('<iframe id="exportFrame" style="display:none"/>');
		    	}
		    	$('#exportFrame').attr('src','exportExcel.action');
		    });
		    
		});			